import request from "@/utils/request";

// 查询售后退款列表
export function listRefund(query) {
  return request({
    url: "cardMall/refund/v1/order/list",
    method: "get",
    params: query,
  });
}

// 查询售后退款详细
export function getRefund(id) {
  return request({
    url: "/system/refund/" + id,
    method: "get",
  });
}

// 新增售后退款
export function addRefund(data) {
  return request({
    url: "/system/refund",
    method: "post",
    data: data,
  });
}

// 修改售后退款
export function updateRefund(data) {
  return request({
    url: "/system/refund",
    method: "put",
    data: data,
  });
}

// 删除售后退款
export function delRefund(id) {
  return request({
    url: "cardMall/refund/v1/order/remove/" + id,
    method: "delete",
  });
}
// 退款
export function returnAfterPrice(data) {
  return request({
    url: "cardMall/refund/v1/order/returnAfterPrice",
    method: "post",
    data,
  });
}
// export function returnAforder(id) {
//   return request({
//     url: "cardMall/refund/v1/order/query?id=" + id,
//     method: "get",
//   });
// }
// 详情
